<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ page contentType="text/html; charset=UTF-8" language="java" %>
<%@ include file="include.jsp" %>



<html>
<head>

    <title>Test</title>
</head>
<style>

    #tabs {
        width: 1000px;
        margin: 0 auto;
    }

    .tab {
        background-color: #99ccff;
        margin-left: 5px;
        margin-right: 5px;
        float: left;
        vertical-align: 50%;
        text-align: center;

    }

    .link {
        text-decoration: none;
        display: block;
        line-height: 30px;
        font-size: medium;
        font-family: sans-serif;
        color: black;
        padding-left: 5px;
        padding-right: 5px;

       

    }

    #line {
        background-color: #6699cc;
        width: 100%;
        height: 10px;
    }

    .active_tab{
        background-color: #6699cc;
    }


</style>                            
<body>
<div id="tabs">

    
    <security:authorize ifAllGranted="ROLE_ADMIN">
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'admin')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/home.htm"/>">Главная</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Category')}">    <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createCategory.htm"/>">Категории</a></div>
        <%--<div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Application')}"> <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createApplication.htm"/>">Приложения</a></div>--%>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Project')}">     <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createProject.htm"/>">Проекты</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'User')}">        <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createUser.htm"/>">Пользователи</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Order')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createOrder.htm"/>">Заявки</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Host')}">        <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createHost.htm"/>">Хосты</a></div>        
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Resource')}">    <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createResource.htm"/>">Ресурсы</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Event')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createEvent.htm"/>">События</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Message')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createMessage.htm"/>">Сообщения</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Report')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/admin/createReport.htm"/>">Отчеты</a></div>
        <div class="tab"><a class="link" href="<c:url value="/jsp/logout.jsp"/>">Выход</a></div>
        <div id="line" style="clear:both"></div>
        <br>
    </security:authorize>
    <security:authorize ifAllGranted="ROLE_USER">
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'user')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/home.htm"/>">Мои ресурсы</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Order')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/user/createOrder.htm"/>">Новая заявка</a></div>
         <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Event')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/user/createEvent.htm"/>">События</a></div>
        <div class="tab <c:if test="${fn:contains(pageContext.request.requestURI, 'Message')}">       <c:out value=" active_tab"/></c:if>"><a class="link" href="<c:url value="/user/createMessage.htm"/>">Сообщения</a></div>
        <div class="tab"><a class="link" href="<c:url value="/jsp/logout.jsp"/>">Выход</a></div>
        <div id="line" style="clear:both"></div>
        <br>
    </security:authorize>


</div>
</body>
<html>




